<?php

declare(ENCODING = 'UTF-8');

/*                                                                        *
 * This script is part of the TYPO3 project - inspiring people to share!  *
 *                                                                        *
 * TYPO3 is free software; you can redistribute it and/or modify it under *
 * the terms of the GNU General Public License version 2 as published by  *
 * the Free Software Foundation.                                          *
 *                                                                        *
 * This script is distributed in the hope that it will be useful, but     *
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *	
 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
 * Public License for more details.                                       *
 *                                                                        */	

/**
 * @package auxo
 * @subpackage AOP
 * @version $Id$
 */

/**	
 * General definitions used to tokenize and parse pointcut expressions
 *	
 * @package auxo
 * @subpackage AOP
 * @version $Id$	
 * @copyright Copyright belongs to the respective authors
 * @author AHN
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
 */
class tx_auxo_AOPPointcutExpression {
	
	/**
	 * all kinds of tokens
	 *
	 */
	const TOKEN_OPEN_BRACKET = 1;
	const TOKEN_CLOSE_BRACKET = 2;
	const TOKEN_AND = 3;
	const TOKEN_OR = 4;
	const TOKEN_PUBLIC = 5;
	const TOKEN_PROTECTED = 6;
	const TOKEN_IDENTIFIER = 7;
	const TOKEN_DOT_DOT = 8;
	const TOKEN_CLASS_REF = 9;
	const TOKEN_END_OF_INPUT = 10;
	const TOKEN_EXECUTE = 11;
	const TOKEN_WITHIN = 12;
	const TOKEN_NOT = 13;
	const TOKEN_COMMA = 14;
	const TOKEN_VARIABLE = 15;
	
	/**
	 * An array of tokens and their string representation
	 *
	 * @var array
	 */
	protected $keywords = array (
				self::TOKEN_OPEN_BRACKET => '(',
				self::TOKEN_CLOSE_BRACKET => ')',
				self::TOKEN_AND => '&&',
				self::TOKEN_OR => '||',
				self::TOKEN_NOT => '!',
				self::TOKEN_PUBLIC => 'public',
				self::TOKEN_PROTECTED => 'protected',
				self::TOKEN_DOT_DOT => '..',
				self::TOKEN_CLASS_REF => '->',
				self::TOKEN_EXECUTE => 'execute',
				self::TOKEN_WITHIN => 'within',
				self::TOKEN_COMMA => ','
			);	
}
?>